package com.example.springsecuritydemo.controller;

import com.example.springsecuritydemo.model.Users;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

/**
 * @author Zenan Chen
 * @date 2023/4/13 17:53
 */
@RestController
@RequestMapping("/api")
public class LoginController {

    private static final Logger log = LoggerFactory.getLogger(LoginController.class);

    @ApiOperation("登陆")
    @GetMapping("/login")
    private String register(@RequestParam String username, @RequestParam String password) {
        try {

            return "登陆成功！";
        } catch (Exception e) {
            log.error("------------------------->/register 登陆异常【{}】", e.getMessage());
            return "登陆异常" + e.getMessage();
        }
    }
}
